'''
Author: dvlproad
Date: 2022-10-10 18:46:08
LastEditors: dvlproad
LastEditTime: 2023-10-19 11:22:36
Description: 
'''
#!/user/local/bin/python3

import os
import subprocess

current_script_path = os.path.abspath(__file__) # 当前脚本路径
current_script_dir = os.path.dirname(current_script_path) # 当前脚本所在目录
test_script_path = f"{current_script_dir}/base_remove_unused_resources.py"

projectAbsRootPath = current_script_dir


assetDir = f"{projectAbsRootPath}/images"
checkInCodeDir = f"{projectAbsRootPath}/lib"
codeSuffixs = [".dart", ".java", ".cpp"]
codeSuffixsString = ",".join(codeSuffixs)    # 将 codeSuffixs 转换为字符串形式，以逗号分隔后传递给脚本
resultSaveToSheetFilePath=f"{projectAbsRootPath}/APP资源清单表.xlsx"

# 注意这里要用 python3.9 (请现在终端执行安装python3.9的命令: brew install python@3.9)
subprocess.run(["python3.9", test_script_path, "-assetDir", assetDir, "-checkInCodeDir", checkInCodeDir, "-codeSuffixsString", codeSuffixsString, "-resultSaveToSheetFilePath", resultSaveToSheetFilePath])